import React, { Component } from 'react'
import { Layout, Menu, Icon } from 'antd'
import { Link, withRouter } from 'react-router-dom'
// import './../style/antd.css'

const { Header } = Layout
const Item = Menu.Item

class HeaderMenus extends Component {
	render() {
		return (
			<Header>
				<Icon
					className="trigger"
					type={this.props.collapsed ? 'menu-unfold' : 'menu-fold'}
					onClick={this.props.toggleSwitch}
				/>
				<Menu
					theme="dark"
					mode="horizontal"
					style={{ float: "right" }}
				>
					<Item key="logout">
						<Link to="/logout">
							<Icon type="logout"/>
							Logout
						</Link>
					</Item>
				</Menu>
			</Header>
		)
	}
}

export default withRouter(HeaderMenus)